#pragma once
#include "framework.h"
#include "GeomEffect.h"
#include <vector>

using namespace poly;

class Geom : public IGeometry
{
public:
	typedef std::vector<float3> Vertices;

	Geom();
	Geom( D3DDevice device, GeomEffect & geomEffect );
	~Geom(void);

	void initialize( D3DDevice device, GeomEffect & geomEffect );
	void destroy();

	void setVertices( Vertices const & vertices );
	Vertices const & vertices() const;
	void render();

private:
	Vertices			m_vertices;
	D3DDevice			m_device;
	VertexBuffer		m_vertexBuffer;
	VertexDeclaration	m_vertexDeclaration;
	GeomEffect*			m_geomEffect;
};
